package com.android.rapidcash.adapters

import android.widget.TextView
import com.android.lib.base.ext.chip
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.rapidcash.abanca.santander.vivus.revolut.waylet.libertex.icmarkets.caixabank.R

class HomeAdapter : BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_home, ArrayList()) {

    override fun convert(holder: BaseViewHolder, item: String) {
        holder.getView<TextView>(R.id.tv_item2).chip(20)
        if (getItemPosition(item) == 0){
            holder.setText(R.id.tv_item1,context.getString(R.string.home_4))
            holder.setText(R.id.tv_item2,"0%")
        }else{
            holder.setText(R.id.tv_item1,context.getString(R.string.home_5))
            holder.setText(R.id.tv_item2,"-10%")
        }


    }


}